package com.example.demo.threadCommunication;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2020年07⽉21⽇<br/>
 * @version：v1.0.0<br>
 */
public class JoinCountDownLatchDemo {

    public static void main(String[] args) throws InterruptedException {

        Thread parse1 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("Thread one finished");
            }
        });

        Thread parse2 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("Thread two finished");
            }
        });

        parse1.start();
        parse2.start();

        parse1.join();
        parse2.join();
        System.out.println("Thread main finished");
    }

}
